package com.db.patterns.prototype.demo03;

/**
 * 指挥者
 */
public class Director {
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public Computer construct() {
        builder.buildCpu();
        builder.buildMemory();
        builder.buildChassis();
        builder.buildGraphicsCard();
        builder.buildSolidState();
        builder.buildMotherboard();
        builder.buildPowerSupply();
        return builder.createComputer();
    }
}
